* cudan

Yet another textboard engine.

** Goal:
[[https://wakaba.c3.cx/s/web/wakaba_kareha][Kareha]] style textboard + some modern revamp.

*** Limitations:
Minimalist approach meaning as less dependencies as possible.

*** Disclaimer:
Modern revamp doesn't mean JavaScript bloat.
Minimalist approach doesn't mean "suckless" ideology.
One should not take it to any side of extreme to make a convenient web site.

** Features:
- inspired by good old Kareha:
  - thread based structure
  - thread index, thread list, thread /subback/
  - sage, nonoko, nonokosage
  - tripcode
  - Atom feed
- innovation:
  - tags (defined by admin, feed can be filtered by tags)
  - subback: board stats, download threads, 
  - modernized web design (e.g. dark responsive theme, max width is not 100%)

*** Stack:
PHP8, XHTML5, vanilla JS, local JSON file as "database".

*** Install

On Debian-like, you will need to install these:

#+BEGIN_SRC bash
  apt install php php-simplexml # mandatory
  apt install apache2 certbot python3-certbot-apache git #optional
#+END_SRC

~.htaccess~ is not recommended by Apache.
Instead you want to put something like this into site config (~sites-available~):

#+BEGIN_EXAMPLE apache
<Directory /var/www/cudan>
        Options -Indexes
        AllowOverride All
        <Files conf.php>
                Require all denied
        </Files>

        <IfModule mod_rewrite.c>
                RewriteEngine On
                # Index redirect
                RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
                RewriteRule ^index\.php$ https://%{HTTP_HOST}/ [R=301,L]
        </IfModule>
</Directory>

<Directory /var/www/cudan/lib>
        Require all denied
</Directory>

<Directory /var/www/cudan/templates>
        Require all denied
</Directory>

#+END_EXAMPLE

** Legend:
*čudan* is "strange" in Bosnian. Credit to Ayashii world.

*Advertising:* This project is written completely in GNU Emacs.

*License:* GPLv3.
